﻿<UserControl x:Class="ScrumFactory.Backlog.IterationPlanning"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
            
             xmlns:props="clr-namespace:ScrumFactory.Backlog.Properties"
             xmlns:SF="clr-namespace:ScrumFactory;assembly=ScrumFactory"   
             xmlns:SF_Comp="clr-namespace:ScrumFactory.Composition;assembly=ScrumFactory.Composition"                             
             xmlns:SF_Adorners="clr-namespace:ScrumFactory.Windows.Helpers.Adorners;assembly=ScrumFactory.Windows.Helpers"
             xmlns:SF_Helpers="clr-namespace:ScrumFactory.Windows.Helpers;assembly=ScrumFactory.Windows.Helpers"
             xmlns:SF_DD="clr-namespace:ScrumFactory.Windows.Helpers.DragDrop;assembly=ScrumFactory.Windows.Helpers"
             xmlns:SF_Converters="clr-namespace:ScrumFactory.Windows.Helpers.Converters;assembly=ScrumFactory.Windows.Helpers"
             xmlns:local="clr-namespace:ScrumFactory.Backlog"
                        
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300"
             
             
             x:Name="thisView">
    
  

    <SF_Helpers:PanelLayout Title="{Binding PanelName}"
                            SF_Comp:CommandBehavior.RoutedEventName="Loaded"
                            SF_Comp:CommandBehavior.TheCommandToRun="{Binding LoadDataCommand}">

        <!-- TOOLBAR -->
        <SF_Helpers:PanelLayout.Toolbar>

            <ToolBar Grid.Row="0">
                <MenuItem Header="{x:Static props:Resources.Add_sprint}" Command="{Binding CreateNewSprintCommand}" Style="{StaticResource Toolbar_MenuItemStyleHideWhenDisabled}" >
                    <MenuItem.Icon>
                        <Image Source="/Images/ToolBar/Add.png" Width="32" Height="32" Stretch="Uniform"/>
                    </MenuItem.Icon>
                </MenuItem>
             
                <MenuItem Header="{x:Static props:Resources.Equalize}" Command="{Binding EqualizeSprintsCommand}" Style="{StaticResource Toolbar_MenuItemStyleHideWhenDisabled}">
                    <MenuItem.Icon>
                        <Image Source="/Images/ToolBar/Equalize.png" Width="32" Height="32" Stretch="Uniform"/>
                    </MenuItem.Icon>
                </MenuItem>
                
                <Menu>
                    <MenuItem Header="{x:Static props:Resources.Schedule_report}">
                        <MenuItem.Icon>
                            <Image Source="/Images/ToolBar/preview.png" Width="32" Height="32" Stretch="Uniform"/>
                        </MenuItem.Icon>
                        <MenuItem.Items>
                            <MenuItem Header="{x:Static props:Resources.Schedule_report}" Command="{Binding ShowDeliveryReportCommand}"/>
                            <MenuItem Header="{x:Static props:Resources.Schedule_full_report}" Command="{Binding ShowFullDeliveryReportCommand}"/>
                            <MenuItem Header="{x:Static props:Resources.Sprint_stack}" Command="{Binding ShowSprintStackReportCommand}"/>
                            
                        </MenuItem.Items>
                    </MenuItem>
                </Menu>
                

                <MenuItem Header="{x:Static props:Resources.Show_all_sprints}" IsCheckable="True" IsChecked="{Binding ShowAllSprints}">
                    <MenuItem.Icon>
                        <Image Source="/Images/ToolBar/all_sprints.png" Width="32" Height="32" Stretch="Uniform"/>
                    </MenuItem.Icon>
                </MenuItem>

    
                <Slider
                    x:Name="zoomControl"
                    Minimum="0.5" Maximum="{Binding MaxZoomFactor}" Width="100" Value="{Binding ZoomFactor, Mode=TwoWay}" TickFrequency="0.5" SmallChange="0.5" LargeChange="2"                    
                    TickPlacement="TopLeft" 
                    HorizontalAlignment="Left" VerticalAlignment="Center"/>

                <ItemsControl Style="{StaticResource PluginMenuItems}" />

            </ToolBar>

        </SF_Helpers:PanelLayout.Toolbar>

        <!-- CONTENT -->
        <SF_Helpers:PanelLayout.Content>
            
            
            
            <ScrollViewer x:Name="scroll" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" Loaded="ScrollViewer_Loaded">
            
                <Grid>

                    <TextBlock Text="{x:Static props:Resources.Ticket_project_alert}" >
                        <TextBlock.Style>
                            <Style TargetType="TextBlock">
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding Project.IsTicketProject}" Value="False">
                                        <Setter Property="Visibility" Value="Collapsed"/>
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </TextBlock.Style>
                    </TextBlock>

                <local:SprintGrid  />

               

                    
                </Grid>

            </ScrollViewer>


                
            
            

        </SF_Helpers:PanelLayout.Content>
        
    </SF_Helpers:PanelLayout>
    
</UserControl>
